<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>

    </style>
    <script src="vue.js"></script>
    <script src="vue-resource.js"></script>
    <script>
        window.onload=function(){
            new Vue({
                el:'body',
                data:{
                    a:'',
                    result:[]
                },
                methods:{
                    get:function(){
                        var _this= this;
                        this.$http.jsonp('https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su',{
                            wd:_this.a
                        },{
                            jsonp:'cb'
                        }).then(function(res){
                            _this.result = res.data.s;
                        },function(res){
                            alert(res.status);
                        });
                    }
                }
            });
        };
    </script>
</head>
<body>
    <input type="text" v-model="a">
    <br>
    <input type="button" value="搜索" @click="get()">
    <ul>
        <li v-for="item in result">{{item}}</li>
    </ul>
</body>
</html>



















